package com.daodao.daodaoschedule.infrastructure.util.converters;

import ma.glasnost.orika.converter.BidirectionalConverter;
import ma.glasnost.orika.metadata.Type;

import java.time.LocalDate;

/**
 * @author mal
 * @date 2023-02-14 17:18
 */
public class LocalDateConverter extends BidirectionalConverter<LocalDate,LocalDate> {
    @Override
    public LocalDate convertTo(LocalDate source, Type<LocalDate> destinationType) {
        return LocalDate.from(source);
    }

    @Override
    public LocalDate convertFrom(LocalDate source, Type<LocalDate> destinationType) {
        return LocalDate.from(source);
    }
}
